/**
 * @Auto generation code
 * Third Order Controller
 */
import request from '../common/request/request.js'

/**
 * 
 * path, params, body, loading
 * 获取服务可用时间 - POST
 */
export const getServiceAvailable = async (loading) => {
	return await request.post('/third-api/available', {
		
	}, {
		
	}, loading)
}


/**
 * 
 * path, params, body, loading
 * 取消订单 - POST
 */
export const cancelOrder = async ({// query params
		orderNo   // 订单号 ,必填 
	
}, loading) => {
	return await request.post('/third-api/cancelOrder', {
		 orderNo, 
	}, {
		
	}, loading)
}


/**
 * 
 * path, params, body, loading
 * 创建一条新的订单 - POST
 */
export const createNewOrder = async (loading) => {
	return await request.post('/third-api/order', {
		
	}, {
		
	}, loading)
}


/**
 * 
 * path, params, body, loading
 * 订单支付 - POST
 */
export const orderPaied = async ({// query params
		orderNo ,   // 订单号 ,必填 
		settlePrice   // 订单金额 ,必填 
	
}, loading) => {
	return await request.post('/third-api/orderPaied', {
		 orderNo,  settlePrice, 
	}, {
		
	}, loading)
}


/**
 * 
 * path, params, loading
 * 获取产品详情 - GET
 */
export const getProductDetail = async (, {// path params
		id   // 产品主键ID  
	
}, {// query params
		city ,   // 城市code  
		orderSource   // 平台Id  
	
}, loading) => {
	return await request.get('/third-api/product/${id}', {
		 city,  orderSource, 
	}, loading)
}


/**
 * 
 * path, params, loading
 * 获取产品列表 - GET
 */
export const queryProductList = async ({// query params
		orderSource ,   // 平台code  
		city   // 城市 ,必填 
	
}, loading) => {
	return await request.get('/third-api/queryProductList', {
		 orderSource,  city, 
	}, loading)
}

